﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Admin : AdminPage
{
    #region Events
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    
    protected void LoginButton_Click(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            Logon(Login1.UserName, Login1.Password);
            Server.Transfer("~/DisplayAllCompanies.aspx", true);
        }
    }
    #endregion

    #region Link Transfer
    protected void _ibmHomePage_Click(object sender, ImageClickEventArgs e)
    {
        if (!IsPostBack || (e.X != 0 && e.Y != 0))
        {
            Server.Transfer("~/Admin.aspx", true);
        }

        //MAJOR HACK: to get event when user presses enter.
        LoginButton_Click(this, null);
    }
    #endregion
}
